<% content_for :page_title do -%>
  <%= posts_title(@tag) %>
<% end -%>

<% content_for :head do -%>
  <%= auto_discovery_link_tag(:atom, @tag.nil? ? formatted_posts_path(:format => 'atom') : posts_path(:tag => @tag, :format => 'atom')) %>
<% end -%>

<% if @posts.empty? -%>
	<p>There are no posts yet.</p>
<% else -%>
	<% @posts.each do |post| -%>
	<div class="post" id="<%= dom_id(post) %>">
	  <%= render post %>
	</div>
	<% end -%>
  <% if more_content? -%>
    <div class="related">Looking for more? Head on over to the <%= link_to 'archives', archives_path %>.</div>
  <% end -%>
<% end -%>
